import request from '@/utils/request'


export function getAllChapterVideo(id) {
    return request({
      url: `/eduservice/chapter/getChapterVideo/${id}`,
      method: 'get'
    })
}

export function addChapter(chapter) {
  return request({
    url: `/eduservice/chapter/addChapter`,
    method: 'post',
    data:chapter
  })
}

export function getChapter(id) {
  return request({
    url: `/eduservice/chapter/getChapter/${id}`,
    method: 'get'
  })
}

export function updateChapter(chapter) {
  return request({
    url: `/eduservice/chapter/updateChapter`,
    method: 'put',
    data:chapter
  })
}

export function deleteChapter(id) {
  return request({
    url: `/eduservice/chapter/deleteChapter/${id}`,
    method: 'delete'
  })
}

